#ifndef SERVER_H
#define SERVER_H

#include <iostream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <set>
#include <fstream>
#include <QtCore/QCoreApplication>
#include <QSqlQuery>
#include <QSqlRecord>
#include <QString>
#include <QStringList>
#include <map>

typedef int SOCKET;

const int BUFFER_SIZE = 1024;
const int PORT = 8080;

void connectDataBase();
void createSocket();
void sqlQuery(const QString query, QString& result, int clientSock);
void addClient(int clientSock, const std::string nickName);
void removeClient(int clientSock);
void notifyClients(const std::string& nickname);

#endif // SERVER_H
